package Dao;

import java.util.HashMap;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class ReserveDao extends SqlMapClientDaoSupport {
	public List<?> roomName() {
		return getSqlMapClientTemplate().queryForList("rvname");
	}
	public List<?> getRoom(String R_NO) {
		return getSqlMapClientTemplate().queryForList("rvgetroom",R_NO);
	}
	public List<?> getRooms() {
		return getSqlMapClientTemplate().queryForList("rvgetrooms");
	}
	public Object getInfo(String R_NO){
		return getSqlMapClientTemplate().queryForObject("rvgetroom",R_NO);
	}
	public Object setReserve(HashMap<String,String> data){
		return getSqlMapClientTemplate().insert("rvsetreserve",data);
	}
	public List<?> getCheckReserve(HashMap<String,String> data){
		return (List<?>)getSqlMapClientTemplate().queryForList("rvcheck",data);
	}
	public void deleteReserve(String RV_NO){
		getSqlMapClientTemplate().delete("rvbye",RV_NO);
	}
}
